package com.xc.erp.modules.erp.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xc.erp.modules.erp.domain.AjaxResult;
import com.xc.erp.modules.erp.domain.dto.LoginBody;
import com.xc.erp.modules.erp.domain.pojo.JshUser;

import java.util.List;

/**
* @author Administrator
* @description 针对表【jsh_user(用户表)】的数据库操作Service
* @createDate 2022-12-10 15:54:06
*/
public interface JshUserService extends IService<JshUser> {

    /**
     * 根据登录名称或用户姓名查询
     * @param pageNum 页码
     * @param pageSize 页面大小
     * @param loginName 登录名
     * @param username 用户名
     * @return 用户里诶包
     */
    Page<JshUser> getUserList(Integer pageNum, Integer pageSize, String loginName, String username);

    AjaxResult login(LoginBody loginBody);

    Object logout();

    /**
     * 注册用户登录
     * @param jshUser 注册用户信息
     * @return 结果
     */
    boolean saveJshUser(JshUser jshUser);

    IPage<JshUser> findByPage(Page<JshUser> page, QueryWrapper<JshUser> queryWrapper);

    void batchSetStatus(Long[] ids, Byte status);

    boolean checkIsLoginNameExist(Long id,String loginName);

    boolean checkIsUserNameExist(Long id,String userName);

    boolean removeByUserId(Integer id);

    boolean removeBatchByUserIds(Long[] ids);
}
